Skip to content

missing.h cleanup#396

Merged
tompng merged 3 commits intoruby:masterfrom
tompng:missing_h_cleanup
Aug 10, 2025
Merged

missing.h cleanup#396
tompng merged 3 commits intoruby:masterfrom
tompng:missing_h_cleanup

Conversation

@tompng
Copy link
Copy Markdown
Member

@tompng tompng commented Jul 30, 2025

Remove unused and wrong #define false 255 definition (bug. non-zero value is truethy)
Remove unused and wrong static int finite(double){...} definition (compile error)
Remove unused isfinite, vabs
Remove HAVE_RB_RATIONAL_NUM check (for ruby < 2.2)

tompng added 3 commits July 30, 2025 21:51
`# define false ((_Bool)-1)` wrongly defines false as truthy value.
`finite(double){return something(n);}` results in compile error.
These ifdef branch were never used.
isfinite, labs, llabs, vabs are not used anymore.

These are never used.
HAVE_RB_RATIONAL_NUM/DEN checks is to support ruby < 2.2.0.
Currently, BigDecimal supports ruby >= 2.5.0
stdlib.h and math.h are explicitly required in bigdecimal.c
@tompng tompng merged commit beb3e1e into ruby:master Aug 10, 2025
79 checks passed
@tompng tompng deleted the missing_h_cleanup branch August 10, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant